<?php
require_once('../libraryfiles/config.php');
$content = 'email_form.php';
$include = '
<link rel="stylesheet" type="text/css" href="' . W_ROOT . '/css/mStyle.css">
<script src="' . W_ROOT . '/js/jquery.js" type="text/javascript"></script>
<script src="' . W_ROOT . '/js/jquery.validate.js" type="text/javascript"></script>
';
$site_title = 'Forget password';
require_once TMP_USER_PATH;

$error = isset($_GET['error']) ? $_GET['error'] : '';
?>
<script type="text/javascript">
    $().ready(function() {
        /*click on province to get location*/
        $("#District").change(function() {
            var gid = $('option:selected', this).attr('data-gps');
            showAddress(gid);
        });
        /*end click on province to get location*/

        /*email validate*/
        jQuery.validator.addMethod("email", function(value, element)
        {
            return this.optional(element) || /^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/i.test(value);
        }, "<?php echo $lang['EMAILSMSS']; ?>");
        /*end email validate*/
        jQuery.validator.addMethod('integer', function(value, element, param) {
            return this.optional(element) || /^[0-9-+]+$/.test(value);
        }, 'Please enter a non zero integer value!');
        $.validator.addClassRules("required", {
            required: true
        });
        $('#resetpassword').validate({
            rules: {
                email: {
                    required: true,
                    email: true
                }
            },
            messages: {
                email: "<?php echo $lang['EMAILSMSS']; ?>"
            }
        });
    });
</script>
<div>
    <div class="span8 offset2">
        <div id="content" class="page">
            <h1 class="page-title"><?php echo $lang['SUCCESSEMAIL']; ?></h1>
            <form action="<?php echo base_url; ?>account/process_foregetpassword.php" method="post" name="txtinputemail" class="form-search" id="resetpassword">
                <div class="page-content" >
                    <div class="content">
                        <table class="form">
                            <tr>
                                <td><?php echo $lang['YOUREMAIL']; ?></td>
                                <td><input type="text" name="email" value="" /></td>
                            </tr>
                        </table>
                    </div>
                    <div class="buttons">
                        <div class="left"><a href="<?php echo base_url; ?>" class="button"><?php echo $lang['BACKK']; ?></a></div>
                        <div class="right">
                            <input type="submit" value="<?php echo $lang['SUBMIT']; ?>" class="button" />
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    function validateForm() {
        var x = document.forms["txtinputemail"]["txtemail"].value;
        if (x == null || x == "") {
            alert("<?php echo $lang['SMSJSCRIPT']; ?>");
            return false;
        }
    }
</script>